using FeishuWorkflowService.Models;

namespace FeishuWorkflowService.Services
{
    public interface IWorkflowService
    {
        /// <summary>
        /// 触发飞书审批流程
        /// </summary>
        /// <param name="request">触发流程请求</param>
        /// <returns>流程实例ID</returns>
        Task<string> TriggerWorkflowAsync(TriggerWorkflowRequest request);

        /// <summary>
        /// 处理飞书审批回调
        /// </summary>
        /// <param name="callbackData">回调数据</param>
        /// <returns>处理结果</returns>
        Task<bool> HandleWorkflowCallbackAsync(WorkflowCallbackData callbackData);

        /// <summary>
        /// 执行审批通过后的业务逻辑
        /// </summary>
        /// <param name="instanceId">流程实例ID</param>
        /// <returns>执行结果</returns>
        Task<bool> ExecuteApprovalPassedActionAsync(string instanceId);
    }
}